#include<stdio.h>
char * reverseWords(char * s) {
	int slow = 0;
	int fast = 0;
	while (s[fast] != '\0') {
		if (s[fast + 1] == ' ' || s[fast + 1] == '\0') {
			int temp = fast;
			while (slow < fast) {
				char temp = s[slow];
				s[slow] = s[fast];
				s[fast] = temp;
				slow++;
				temp--;
			}
			slow = fast + 2;
		}
		fast++;
	}
	return s;
}

int main() {
	char s[] = "Let's take LeetCode contest";
	char* ch = reverseWords(s);
}